import { types } from 'mediasoup-client'
export interface joinRoomCallbackData { rtpCapabilities: types.RtpCapabilities }
export interface createWebrtcTransportCallbackData { params: types.TransportOptions, error: any }
export interface sendTransportProduceCallbackData { id: string }
export interface remoteProducerState { producerId: string, kind: string, socketId: string }
export interface createConsumerCallbackData { consumerId: string, kind: types.MediaKind, producerId: string, rtpParameters: types.RtpParameters }
export interface producerType {
    socketId: string;
    producer: types.Producer
    roomId: string,
    producerId: string
}
export interface consumerType {
    socketId: string;
    consumer: types.Consumer
    roomId: string,
    consumerId: string,
    producerId: string
}
export type transportType = 'producer' | 'consumer'
export interface transportsType {
    socketId: string,
    transport: types.Transport,
    roomId: string,
    type: transportType,
    producerId: string
}
export interface RoomStatus {
    room: string;
    roomCreater: string | undefined;
    users: {
        socketId: string;
        room: string;
        appdata: any;
    }[];
    producers: producerType[];
    consumers: consumerType[];
    transports: transportsType[];
    socketId: string
}
export interface getResumersData {
    producerId: string,
    consumer: types.Consumer,
    socketId: string,
    // track: MediaStream,
    // kind: types.MediaKind
}
export interface producerType {
    socketId: string;
    producer: types.Producer
    roomId: string,
    producerId: string
}
export interface consumersType {
    [key: string]: {
        audio: {
            track: MediaStreamTrack,
            consumer: types.Consumer
        },
        video: {
            track: MediaStreamTrack,
            consumer: types.Consumer
        }
    }
}

export interface createPlainTransportParams {
    rtpPort: number;
    rtcpPort: number;
    producerId: string;
    type: number;
    ssrc: number;
    rtpIp: string;
    rtcpIp: string;
}



export interface createPlainTransport {
    [audio: string]: createPlainTransportParams;
}